/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package slcu.service.persistence;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.ReferenceRegistry;
import com.liferay.portal.service.ServiceContext;

import slcu.model.Alumno;

import java.util.List;

/**
 * The persistence utility for the Alumno service. This utility wraps {@link AlumnoPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author tito
 * @see AlumnoPersistence
 * @see AlumnoPersistenceImpl
 * @generated
 */
public class AlumnoUtil {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
	 */

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
	 */
	public static void clearCache() {
		getPersistence().clearCache();
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
	 */
	public static void clearCache(Alumno alumno) {
		getPersistence().clearCache(alumno);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
	 */
	public long countWithDynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return getPersistence().countWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
	 */
	public static List<Alumno> findWithDynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
	 */
	public static List<Alumno> findWithDynamicQuery(DynamicQuery dynamicQuery,
		int start, int end) throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
	 */
	public static List<Alumno> findWithDynamicQuery(DynamicQuery dynamicQuery,
		int start, int end, OrderByComparator orderByComparator)
		throws SystemException {
		return getPersistence()
				   .findWithDynamicQuery(dynamicQuery, start, end,
			orderByComparator);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
	 */
	public static Alumno update(Alumno alumno, boolean merge)
		throws SystemException {
		return getPersistence().update(alumno, merge);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
	 */
	public static Alumno update(Alumno alumno, boolean merge,
		ServiceContext serviceContext) throws SystemException {
		return getPersistence().update(alumno, merge, serviceContext);
	}

	/**
	* Caches the Alumno in the entity cache if it is enabled.
	*
	* @param alumno the Alumno
	*/
	public static void cacheResult(slcu.model.Alumno alumno) {
		getPersistence().cacheResult(alumno);
	}

	/**
	* Caches the Alumnos in the entity cache if it is enabled.
	*
	* @param alumnos the Alumnos
	*/
	public static void cacheResult(java.util.List<slcu.model.Alumno> alumnos) {
		getPersistence().cacheResult(alumnos);
	}

	/**
	* Creates a new Alumno with the primary key. Does not add the Alumno to the database.
	*
	* @param alumnoId the primary key for the new Alumno
	* @return the new Alumno
	*/
	public static slcu.model.Alumno create(long alumnoId) {
		return getPersistence().create(alumnoId);
	}

	/**
	* Removes the Alumno with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param alumnoId the primary key of the Alumno
	* @return the Alumno that was removed
	* @throws slcu.NoSuchAlumnoException if a Alumno with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Alumno remove(long alumnoId)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchAlumnoException {
		return getPersistence().remove(alumnoId);
	}

	public static slcu.model.Alumno updateImpl(slcu.model.Alumno alumno,
		boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().updateImpl(alumno, merge);
	}

	/**
	* Returns the Alumno with the primary key or throws a {@link slcu.NoSuchAlumnoException} if it could not be found.
	*
	* @param alumnoId the primary key of the Alumno
	* @return the Alumno
	* @throws slcu.NoSuchAlumnoException if a Alumno with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Alumno findByPrimaryKey(long alumnoId)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchAlumnoException {
		return getPersistence().findByPrimaryKey(alumnoId);
	}

	/**
	* Returns the Alumno with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param alumnoId the primary key of the Alumno
	* @return the Alumno, or <code>null</code> if a Alumno with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Alumno fetchByPrimaryKey(long alumnoId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByPrimaryKey(alumnoId);
	}

	/**
	* Returns all the Alumnos where dni = &#63;.
	*
	* @param dni the dni
	* @return the matching Alumnos
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<slcu.model.Alumno> findByDNI(
		java.lang.String dni)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByDNI(dni);
	}

	/**
	* Returns a range of all the Alumnos where dni = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param dni the dni
	* @param start the lower bound of the range of Alumnos
	* @param end the upper bound of the range of Alumnos (not inclusive)
	* @return the range of matching Alumnos
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<slcu.model.Alumno> findByDNI(
		java.lang.String dni, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByDNI(dni, start, end);
	}

	/**
	* Returns an ordered range of all the Alumnos where dni = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param dni the dni
	* @param start the lower bound of the range of Alumnos
	* @param end the upper bound of the range of Alumnos (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching Alumnos
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<slcu.model.Alumno> findByDNI(
		java.lang.String dni, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByDNI(dni, start, end, orderByComparator);
	}

	/**
	* Returns the first Alumno in the ordered set where dni = &#63;.
	*
	* @param dni the dni
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching Alumno
	* @throws slcu.NoSuchAlumnoException if a matching Alumno could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Alumno findByDNI_First(java.lang.String dni,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchAlumnoException {
		return getPersistence().findByDNI_First(dni, orderByComparator);
	}

	/**
	* Returns the first Alumno in the ordered set where dni = &#63;.
	*
	* @param dni the dni
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching Alumno, or <code>null</code> if a matching Alumno could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Alumno fetchByDNI_First(java.lang.String dni,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByDNI_First(dni, orderByComparator);
	}

	/**
	* Returns the last Alumno in the ordered set where dni = &#63;.
	*
	* @param dni the dni
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching Alumno
	* @throws slcu.NoSuchAlumnoException if a matching Alumno could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Alumno findByDNI_Last(java.lang.String dni,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchAlumnoException {
		return getPersistence().findByDNI_Last(dni, orderByComparator);
	}

	/**
	* Returns the last Alumno in the ordered set where dni = &#63;.
	*
	* @param dni the dni
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching Alumno, or <code>null</code> if a matching Alumno could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Alumno fetchByDNI_Last(java.lang.String dni,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByDNI_Last(dni, orderByComparator);
	}

	/**
	* Returns the Alumnos before and after the current Alumno in the ordered set where dni = &#63;.
	*
	* @param alumnoId the primary key of the current Alumno
	* @param dni the dni
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next Alumno
	* @throws slcu.NoSuchAlumnoException if a Alumno with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static slcu.model.Alumno[] findByDNI_PrevAndNext(long alumnoId,
		java.lang.String dni,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchAlumnoException {
		return getPersistence()
				   .findByDNI_PrevAndNext(alumnoId, dni, orderByComparator);
	}

	/**
	* Returns all the Alumnos.
	*
	* @return the Alumnos
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<slcu.model.Alumno> findAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll();
	}

	/**
	* Returns a range of all the Alumnos.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of Alumnos
	* @param end the upper bound of the range of Alumnos (not inclusive)
	* @return the range of Alumnos
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<slcu.model.Alumno> findAll(int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end);
	}

	/**
	* Returns an ordered range of all the Alumnos.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of Alumnos
	* @param end the upper bound of the range of Alumnos (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of Alumnos
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<slcu.model.Alumno> findAll(int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end, orderByComparator);
	}

	/**
	* Removes all the Alumnos where dni = &#63; from the database.
	*
	* @param dni the dni
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByDNI(java.lang.String dni)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByDNI(dni);
	}

	/**
	* Removes all the Alumnos from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public static void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeAll();
	}

	/**
	* Returns the number of Alumnos where dni = &#63;.
	*
	* @param dni the dni
	* @return the number of matching Alumnos
	* @throws SystemException if a system exception occurred
	*/
	public static int countByDNI(java.lang.String dni)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByDNI(dni);
	}

	/**
	* Returns the number of Alumnos.
	*
	* @return the number of Alumnos
	* @throws SystemException if a system exception occurred
	*/
	public static int countAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countAll();
	}

	public static AlumnoPersistence getPersistence() {
		if (_persistence == null) {
			_persistence = (AlumnoPersistence)PortletBeanLocatorUtil.locate(slcu.service.ClpSerializer.getServletContextName(),
					AlumnoPersistence.class.getName());

			ReferenceRegistry.registerReference(AlumnoUtil.class, "_persistence");
		}

		return _persistence;
	}

	/**
	 * @deprecated
	 */
	public void setPersistence(AlumnoPersistence persistence) {
	}

	private static AlumnoPersistence _persistence;
}